package com.highcom.springboot0305mybatis.mapper;

import com.highcom.springboot0305mybatis.bean.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.List;

@Mapper
public interface EmpMapper {
    Emp getEmp(Integer id);

    @Insert("insert into emp (emp_name,emp_age) values (#{empName},#{empAge})")
    @Options(useGeneratedKeys = true,keyProperty = "empId")
    public void insert(Emp emp);
}
